import QtQuick 2.15
import QtQuick.Layouts 1.15
import "../components"
import "../theme"

Rectangle {
    color: Theme.backgroundWhite

    ColumnLayout {
        anchors.fill: parent
        anchors.margins: 20
        spacing: 20

        // Color Demo
        Column {
            spacing: 10
            Layout.fillWidth: true

            Text {
                text: "Brand Color"
                font.pixelSize: 16
                color: Theme.textPrimary
            }

            Row {
                spacing: 10

                Rectangle {
                    width: 100
                    height: 80
                    color: Theme.primary
                    
                    Column {
                        anchors.centerIn: parent
                        Text {
                            text: "Primary"
                            color: "white"
                        }
                        Text {
                            text: "#409EFF"
                            color: "white"
                        }
                    }
                }

                Rectangle {
                    width: 100
                    height: 80
                    color: Theme.success
                    
                    Column {
                        anchors.centerIn: parent
                        Text {
                            text: "Success"
                            color: "white"
                        }
                        Text {
                            text: "#67C23A"
                            color: "white"
                        }
                    }
                }

                // 可以继续添加其他颜色展示
            }
        }

        // Button Demo
        Column {
            spacing: 10
            Layout.fillWidth: true

            Text {
                text: "Button"
                font.pixelSize: 16
                color: Theme.textPrimary
            }

            Row {
                spacing: 10

                EButton {
                    text: "Default"
                }

                EButton {
                    text: "Primary"
                    type: "primary"
                }

                EButton {
                    text: "Success"
                    type: "success"
                }

                EButton {
                    text: "Warning"
                    type: "warning"
                }

                EButton {
                    text: "Danger"
                    type: "danger"
                }
            }
        }
    }
} 